import { createSSRApp } from "vue"
import App from "./App.vue"
import { createPinia } from "pinia"
import { createUnistorage } from "pinia-plugin-unistorage"
export function createApp() {
  // createSSRApp 创建 Vue 应用实例
  const app = createSSRApp(App)
  // createPinia 创建 Pinia 实例
  const pinia = createPinia()
  // 使用 unistorage 插件, 让 pinia 支持持久化存储
  pinia.use(createUnistorage())
  // 将 Pinia 整合到 Vue 应用实例上
  app.use(pinia)
  return {
    app,
  }
}
